<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common/cssAndjs.jsp"%>
<%
 String path = request.getContextPath();
 String basePath = request.getScheme() + "://"
   + request.getServerName() + ":" + request.getServerPort()
   + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Complex Layout - jQuery EasyUI Demo</title>
	<style>
	a {
   color: #fff;
   text-decoration: none;
}
	</style>
	<script>
 		$(function(){
 			$('#tt').tree({
 			    url:'${ctx}/menu/getMenus',
 			   onClick : function (node) {
 	 	            if (node.attributes) {
 	 	                Open(node.text, node.attributes.URL);
 	 	            }
 	 	        }
 			});

		});
 		//实例化树形菜单
//  	    $("#tt").tree({
//  	        data : treeData,
//  	        lines : true,
 	       
//  	    });
 	    //在右边center区域打开菜单，新增tab
 	    function Open(text, url) {
 	        if ($("#tabs").tabs('exists', text)) {
 	            $('#tabs').tabs('select', text);
 	        } else {
 	        	if(text=='ftp管理'){
 	        		window.open(url,'newWin');
 	        	}else{
 	        		var content = '<iframe scrolling="auto" frameborder="0"  src="${ctx}/'+url+'"; style="width:100%;height:100%;"></iframe>';
 	 	        	$('#tabs').tabs('add', {
 	 	                title : text,
 	 	                closable : true,
 	 	                content : content
 	 	            });
 	        	}
 	        	
 	        }
 	    }
	</script>
</head>
<body class="easyui-layout">
	<!-- <div data-options="region:'north',split:false" title="ZPX" style="padding:10px;">
		<p style="color:red;font-size:36px;">全能管理系统</p>
	</div> -->
	<div region="north" split="true" border="false" style="overflow: hidden; height: 30px;
        background: url(${ctx}/css/homeimages/layout-browser-hd-bg.gif) #7f99be repeat-x center 50%;
        line-height: 20px;color: #fff; font-family: Verdana, 微软雅黑,黑体"> <span style="float:right; padding-right:20px;" class="head">欢迎 <c:out value="${sessionScope.loginUser.username}"></c:out> <a href="#" id="editpass">修改密码</a> <a href="${ctx}/logout" id="loginOut">安全退出</a></span> <span style="padding-left:10px; font-size: 16px; "><img src="${ctx}/css/homeimages/blocks.gif" width="20" height="20" align="absmiddle" />项目管理系统</span> </div>
	
	<div data-options="region:'south',split:true" title="South Title" style="height:100px;padding:10px;background:#efefef;">
		<div class="easyui-layout" data-options="fit:true" style="background:#ccc;">
			<div data-options="region:'center'">sub center</div>
			<div data-options="region:'east',split:true" style="width:200px;">sub center</div>
		</div>
	</div>
	<div data-options="region:'east',split:true" title="导航菜单" style="width:180px;">
		<ul id="tt" class="easyui-tree"></ul>
	</div>
	<div data-options="region:'west',split:true" title="West Menu" style="width:280px;padding1:1px;overflow:hidden;">
		<div class="easyui-accordion" data-options="fit:true,border:false">
			<div title="Title1" style="padding:10px;overflow:auto;">
				<p>${ctx}</p>
				<p>content1</p>
				<p>content1</p>
				<p>content1</p>
				<p>content1</p>
				<p>content1</p>
				<p>content1</p>
				<p>content12</p>
			</div>
			<div title="Title2" data-options="selected:true" style="padding:10px;">
				content2
			</div>
			<div title="Title3" style="padding:10px">
				content3
			</div>
		</div>
	</div>
	<div data-options="region:'center'"  style="overflow:hidden;">
		<div class="easyui-tabs" data-options="fit:true,border:false" id="tabs"  >
			<div title="首页" data-options="iconCls:'icon-notify',closable:true"  style="padding:20px;overflow:hidden;"> 
				<div style=" width:100%; height:100%; z-index:-1">
					<img src="${ctx}/css/home.jpg" width="100%" height="100%" alt="图片" />
				</div>
			</div>
			
				<table id="tt" style="overflow:hidden;padding:0px;" style="overflow:hidden;padding:5px;" ></table> 

		</div>
	</div>
</body>
</html>